/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;

import java.util.Date;

/**
 * 代理商绑定设备Entity
 * @author rongjie
 * @version 2017-08-06
 */
public class WxAgentsEquipment extends DataEntity<WxAgentsEquipment> {
	
	private static final long serialVersionUID = 1L;
	private YjEquipment equipment;		// 设备
	private WxAgents agents;		// 代理商
	private Date time;		// 绑定时间

	public WxAgentsEquipment() {
		super();
		this.setIdType(IDTYPE_AUTO);
	}

	public WxAgentsEquipment(String id){
		super(id);
	}

	@ExcelField(title="设备", fieldType=YjEquipment.class, value="equipment.name", align=2, sort=3)
	public YjEquipment getEquipment() {
		return equipment;
	}

	public void setEquipment(YjEquipment equipment) {
		this.equipment = equipment;
	}
	
	@ExcelField(title="代理商", fieldType=WxAgents.class, value="agents.username", align=2, sort=4)
	public WxAgents getAgents() {
		return agents;
	}

	public void setAgents(WxAgents agents) {
		this.agents = agents;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="绑定时间", align=2, sort=5)
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

}